# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=ktrip
pkgver=23.08.4
pkgrel=0
pkgdesc="A public transport assistant"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://invent.kde.org/utilities/ktrip"
license="GPL-2.0-only OR GPL-3.0-only"
depends="
	kde-icons
	kirigami-addons
	kirigami2
	"
makedepends="
	extra-cmake-modules
	kconfig5-dev
	kcontacts5-dev
	ki18n5-dev
	kitemmodels5-dev
	kpublictransport-dev
	qqc2-desktop-style5-dev
	qt5-qtbase-dev
	qt5-qtdeclarative-dev
	qt5-qtquickcontrols2-dev
	samurai
	"
_repo_url="https://invent.kde.org/utilities/ktrip.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/ktrip-$pkgver.tar.xz"
options="!check" # No tests

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DKF_IGNORE_PLATFORM_CHECK=ON
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
da41bb5553494e7c5dc253fdb8ecc99a32978f65b93e26f6c96baea0cfc4ae1c7d00015b87fff4920ef0e181666aba370922ac47702a5d95500bf003bf51d998  ktrip-23.08.4.tar.xz
"
